import Vue from 'vue'
import Router from 'vue-router'
import HomeContainer from '@/components/tabbar/HomeContainer'
import ImageContainer from '@/components/tabbar/ImageContainer'
import PhotoInfo from '@/components/photos/PhotoInfo'
import ShopcarContainer from '@/components/tabbar/ShopcarContainer'
import NewsContainer from '@/components/tabbar/NewsContainer'
import NewsInfo from '@/components/news/NewsInfo'
import GoodsInfo from '@/components/goods/GoodsInfo'
import GoodsDesc from '@/components/goods/GoodsDesc'
import GoodsComment from '@/components/goods/GoodsComment'

Vue.use(Router)

export default new Router({
  // mode:'history',
  routes: [
    {path: '/', redirect: '/home' },
    {path: '/home',component: HomeContainer},
    {path: '/image',component: ImageContainer},
    {path: '/image/photoinfo/:id',component: PhotoInfo},
    {path: '/shopcar',component: ShopcarContainer},
    {path: '/newslist',component: NewsContainer},
    {path: '/newslist/newsinfo/:id',component: NewsInfo},
    {path: '/home/goodsinfo/:id', component: GoodsInfo, name: 'goodsinfo' },
    {path: '/home/goodsdesc/:id', component:GoodsDesc, name: 'goodsdesc'  },
    {path: '/home/goodscomment/:id', component: GoodsComment, name: 'goodscomment' }
  ],
  linkActiveClass: 'mui-active' // 覆盖默认的路由高亮的类，默认的类叫做 router-link-active
})
